<?php
        function cmp_asc ($a, $b) {
            if ($a[$GLOBALS['includechildnodes_sortedby']] == $b[$GLOBALS['includechildnodes_sortedby']])
                return 0;
            else
                return ($a[$GLOBALS['includechildnodes_sortedby']] < $b[$GLOBALS['includechildnodes_sortedby']]) ? -1 : 1;
        }
        
        function cmp_desc ($a, $b) {
            if ($a[$GLOBALS['includechildnodes_sortedby']] == $b[$GLOBALS['includechildnodes_sortedby']])
                return 0;
            else
                return ($a[$GLOBALS['includechildnodes_sortedby']] > $b[$GLOBALS['includechildnodes_sortedby']]) ? -1 : 1;
        }
        
?>